home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PROGEDIT
/
3458B.ZIP
/
AMAC44B.ZIP
/
QLST15.QM
< prev
next >
Wrap
Text File
|
1992-05-27
|
15KB
|
345 lines
* QLST15.QM
* Macros To Load a File List of Files In Ring
* Written by Tom Hogshead
* With Macro Contribution by Kyle Watkins
* 6/1/92
* Load
* Key Subfile Macros To Load File List of Files In Ring Byts Secs
* === ============== ========================================= ==== ====
* @1 {e:\up\qlst@1} Does NOT Read First File's Macros (K Watkins)19 67
*
* @2 {e:\up\qlst@2} Reads First File's Macros If It Exists, 50 31 |new
* Selects Files At ListFiles Prompt
*
* @3 {e:\up\qlst@3} <BEST>
* Reads First File's Macros If It Exists, >> 77 26 |new
* Selects Files At ListFiles Prompt,
* Makes List Paragraph For Fast Loading
*
* @f1 {e:\up\qlst@f1} Emulates PC Mag. Filectrl.com 54 31 |new
*
* @f2 {e:\up\qlst@f2} <FASTEST>
* Loads Only First File In Ring,
* Emulates PC Mag. Filectrl.com 25 6+|new
*
*
* @f3 {e:\up\qlst@f3} Emulates PC Mag. Filectrl.com, 81 27 |new
* Makes List Paragraph For Fast Loading
*
* Description
* Syntax
* Load QLST Files, How To
* File List qlst.ql Contents
* Fit In Qconfig.dat
* Configuration - MUST do
* Stopping @f1-@f3
* Timing Measurements
* What's Best? See Timing Measurements
* Macros
* Version History
*
*--eoi
*
* (DESCRIPTION)
* --------------
* QLST15.QM are macros to load a file list of files into the QEdit
* ring. The number of files in the list is practically unlimited.
* The excellent macro @1 below, written by Kyle Watkins of SemWare, is
* the basis for all macros in QLST15.QM. This macro takes advantage of
* the fact that by specifying CurrentFilename plus a space plus the
* desired file name in the EditFile prompt, both the current file plus
* the file marked in the file list are loaded into the ring. EditFile,
* like the QEdit command line, accepts multiple file names together,
* separated by spaces as if they had been load via a wildcard.
* Loading the current file returns us to the buffer we are in with no
* disk access. The end result is that the file from the list is
* entered in QEdit's "ring" without actually loading it. It only loads
* when we either Nextfile into it, or it is selected from the file
* selection prompt(s).
* In attempting to optimize Kyle's file loading technique for speed and
* size, it was found that using a Nul file to copy the file list to
* before loading significantly reduces loading time. Macros @2, @3, f1
* and f3 use this Nul file technique, which reduces the number of disk
* acceses because the Nul file is always the current file for
* currentfilename and Dos never acceses the disk to load Nul. The
* number of disk acceses using the Nul technique is reduced by the
* number of file lines in the file list. This is important loading
* long file lists.
* Two of the macros, @3 and @f3 format the file list in the Nul file to
* a single paragraph before loading, which also improves file loading
* times. Timing results below also suggest that using a cache with
* these macros is a 'must'.
* For what macro is best, see discussion in Timing Measurements.
* Some of these macros require QEdit v2.15.
* RINGnn.QM in AMACnn.ZIP contains other macros to save and
* subsequently load at another editing session a list of files in ring.
*
* (SYNTAX)
* ---------
* Q d:\path\name.ql /Ed:\path\QLSTnn.MAC, where
* name is the file list name with extension 'ql', and
* QLSTnn.MAC is the macro file name containing the macro
* as the first macro in the file QLSTnn.QM.
* Because of it's speed, size and versatility, I keep macro @3 in a
* separate macro file, qlst.mac, in g:\qe. To load QLST15.QM files I
* would, therefore, use:
* Q qlst.ql /Eg:\qe\qlst.mac , where
* qlst.ql is the file list for QLST15.QM, and
* qlst.mac is macro @3 duplicated in qlst.qm
* QLST15.QM files can also be loaded with any of the following
* commands:
* Q qlst.ql /EQLST15.MAC (Uses @1)
* Q qlst.ql /Eqlst@1.mac " "
* Q qlst.ql /Eqlst@2.mac
* Q qlst.ql /Eqlst@3.mac
* Q qlst.ql /Eqlst@f1.mac
* Q qlst.ql /Eqlst@f2.mac
* Q qlst.ql /Eqlst@f3.mac
* Different file lists can be loaded by changing 'qlst.ql' to file list
* d:\path\name.ext as shown in the Syntax above.
*
* TO (LOAD) QLST FILES
* ---------------------
* 1) Type any of the above commands or the following to load QLST
* files, or: START QLST <enter>.
* 2) All macros, except @1, enable the user to select a file to
* load at the prompt(s). Selecting the first file in qlst.ql
* will load this file in a full window for editing. Selecting
* another file at the prompt, will load that file in a full
* window for editing, and the macros of QLST15.QM will be read
* with macros @2 and @3.
* 3) Files from other file lists can be loaded while QLST15.MAC
* macros are loaded by loading that file's file list in another
* window and executing any of the macros.
* 4) Another option is to put any of the macros except qlst@f3 (it
* won't fit) in your QCONFIG.DAT on one line. You will then be
* able to load other file lists at all times while editing any
* file.
*
* (FILE) LIST qlst.ql
* --------------------
* Contents of the QLST15.QM file list qlst.ql are:
*
* ┌── qlst.ql ──┐
* │QLST15.QM │
* │qlst@1.qm │
* │qlst@2.qm │
* │qlst@3.qm │
* │qlst@f1.qm │
* │qlst@f2.qm │
* │qlst@f3.qm │
* │qlst.qm │
* │qlst.inf │
* │read.me │
* │allmacro.inf │
* │allmac.inf │
* │qlst.lst │
* │qlst.ql │
* └─────────────┘
*
* (FIT) IN QCONFIG.DAT
* ---------------------
* All macros, except @f3, will fit on one line of Qconfig.dat.
*
* (Configuration) - MUST do
* ---------------------------
* In order to access files and/or invoke macros in different
* directories, file names containing 'e:\up\' MUST be configured for
* the user directory containing AMAC files. See Bookxx.QM for
* instructions.
*
* Stopping @f1-@f3
* ------------------
* Macros @f1-@f3 may be stopped by either pressing 'Ctrl Break Esc Esc'
* or 'Esc' three times.
*
* (TIMING) MEASUREMENTS, (What)'s Best ?
* ---------------------------------------
* File list loading times using these macros using the file Allmac.ql
* were measured with a stop watch. These times and the number of files
* loaded per second (fps) were calculated and are summarized below.
* File Allmac.ql consisted of:
* 95 files
* 103 lines
* 17 empty lines
* 17 files on 8 lines with other files,
* 1 line has 3 files, 7 lines have 2 files each
* I find the best and fastest file load macro is @3. Of the macros
* that load all files in the ring, it loads files the fastest. This
* macro loads a file list of files in the QEdit ring, reads the macfile
* of the first file in the file if it exists. At the ListFiles prompt
* the user may select any file from the ring to load or press escape
* and be positioned in the first file in the file list in a full window
* for editing. This macro is somewhat faster than @2 because it
* formats the file list in the Nul file to a single paragraph before
* loading, which also improves file loading times.
* Macro @f2 loads the fastest, but only the first file is the list is
* loaded in the ring. This macro prompts the user, however, to select
* other files for loading, and it may be useful with very long file
* lists when only a few files need to be accessed.
* Cache off Cache on
* ============== ==================================
* AMAC42 These Macros
* Macro (w/nul) (w/o nul) (w/nul)
* ----- -------------- ------------- --------------
* (secs) (fps) (secs) (fps) (secs) (fps)
* @1 164 0.58 67 1.42
* @2 80 1.19 67 1.42 31 3.06
* @3 75 1.27 33 2.88 >> 26 3.65 <<
* @f1 80 1.19 67 1.42 31 3.06
* @f2 11 8.64 >> 6 15.83 <<
* @f3 80 1.19 33 2.88 27 3.52
* M A C R O S (Macros)
* ----------------------------------------------------------------------
* @(1) Load File List In Ring, Does NOT Read First File's Macros,
* (Kyle Watkins, author)
* ----------------------------------------------------------------------
* This macro will load a file list of files into the QEdit ring. The
* number of files in the list is practicaly unlimited. This excellent
* macro, written by Kyle Watkins of SemWare, is the basis for all other
* macros in QLSTnn.QM. See Description above for discussion how it
* works. This macro is also included in a separate file qlst@1.qm.
@1 MacroBegin
EndFile BegLine * start at last line
REPEAT:
UnmarkBlock MarkLine Copy * grab this name
EditFile * get ready to load
CurrentFilename " " * to force return *here*
Paste Return * paste file name & do it!
CursorUp * more lines above?
JTrue REPEAT * if yes, repeat.
*
* 19 bytes Tue 07-31-1990 18:30:10 (KW @1, size added by TH)
*
* -----------------------------------------------------------------------
* @(2) Load File List In Ring,
* Read First File In Filelist Macro If It Exists,
* User Selects File To Load From ListFiles Prompt
* ----------------------------------------------------------------------
* This macro loads a file list of files in the QEdit ring, reads the
* macfile of the first file in the file if it exists. At the
* ListFiles prompt the user may select any file from to ring to load or
* press escape and be positioned in the first file in the file list in
* a full window for editing.
* If the first file in the file list does not have a 2 letter extension
* (I use 'qm'), and a corresponding macro with the same name and
* extension 'mac' does not exist, the macro must be modified in order
* to read the macro of the first file in the list.
* If the first file in the file list does not have a corresponding
* macro at all, the macro treats the first file as a normal (i.e.
* non-macro) file for editing.
* (This macro is in a separate file qlst@2.qm.)
*
* ----------------------------------------------------------------------
* @(3) Load File List In Ring,
* Read First File In Filelist Macro If It Exists,
* User Selects File To Load From ListFiles Prompt,
* Makes Paragraph of File List For Faster Loading
* ----------------------------------------------------------------------
* This macro loads a file list of files in the QEdit ring, reads the
* macfile of the first file in the file if it exists. At the
* ListFiles prompt the user may select any file from to ring to load or
* press escape and be positioned in the first file in the file list in
* a full window for editing. As can be seen in Timing Measurements,
* this macro is somewhat faster than @2 because it formats the file
* list in the Nul file to a single paragraph before loading, which also
* improves file loading times.
* If the first file in the file list does not have a 2 letter extension
* (I use 'qm'), and a corresponding macro with the same name and
* extension 'mac' does not exist, the macro must be modified in order
* to read the macro of the first file in the list.
* If the first file in the file list does not have a corresponding
* macro at all, the macro treats the first file as a normal (i.e.
* non-macro) file for editing.
* ( This macro is in a separate file qlst@3.qm. )
*
* ----------------------------------------------------------------------
* @(f1) Load File List In Ring,
* User Selects File To Load Emulating PC Magazine Filectrl.com,
* ----------------------------------------------------------------------
* ( This macro is in a separate file qlst@f1.qm. )
*
* ----------------------------------------------------------------------
* @(f2) Load File List In Ring,
* User Selects File To Load Emulating PC Magazine Filectrl.com,
* Loads Only First File In Ring
* ----------------------------------------------------------------------
* Macro @f2 loads the fastest, but only the first file is the list is
* loaded in the ring. This macro prompts the user, however, to select
* other files for loading, and it may be useful with very long file
* lists when only a few files need to be accessed.
* ( This macro is in a separate file qlst@f2.qm. )
*
* ----------------------------------------------------------------------
* @(f3) Load File List In Ring,
* User Selects File To Load Emulating PC Magazine Filectrl.com,
* Makes Paragraph of File List For Faster Loading,
* ----------------------------------------------------------------------
* ( This macro is in a separate file qlst@f3.qm. )
*
* (VERSION) HISTORY
* ------------------
* 1.4 - Changed file name ! to NUL in @0 in QLST0.QM.
* 1.4a - Minor documentation changes.
* 1.4b - Shortened @0. 2/16/92
* - In AMAC42.ZIP. 3/28/92
* 1.5 - Changed @0 to @2. QEdit v2.15 required. 5/5/92
* - Removed qlst0.qm. 5/5/92
- Moved file list loading macros from RINGnn.QM. 5/6/92
* - Re-wrote documentation. 5/6/92
*
*
*
*
*--(eof)